package classes.view.component
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class ReadyScreen extends MovieClip
	{
		private var _ready_clip:MovieClip;
		
		public function ReadyScreen()
		{
			super();
			setLayOut();
			init();
		}
		private function setLayOut():void
		{
			_ready_clip = this.getChildByName('ready_clip')	as MovieClip;
			_ready_clip.stop();
		}
		
		private function init():void
		{
			_ready_clip.addEventListener("endAnimation",	onEndClipAnimation);
		}
		
		private function onEndClipAnimation(e:Event):void
		{
			dispatchEvent(new Event("ReadyOff"));
		}
		
		public function readyscreen_switch($bool:Boolean):void
		{
			if($bool){
				_ready_clip.gotoAndPlay(2);
			}else{
				this.gotoAndStop(1);
			}
		}
		
	}
}